﻿#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QFileDialog>
#include <QFile>
#include <QMainWindow>
#include <QTimer>
#include <QImage>
#include <QPixmap>
#include <QDateTime>
#include <QMutex>
#include <QMutexLocker>
#include <QMimeDatabase>
#include <iostream>
#include <chrono>
#include "detector.h"





QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow(QWidget *parent = nullptr);
    ~MainWindow();
    void addMask(QPixmap& p_img);

private slots:
    void on_openfile_clicked();

    void on_startdetect_clicked();

    void on_stopdetect_clicked();

    void on_comboBox_activated(const QString &arg1);

    void on_pausedetect_clicked();

signals:
    void send_videofile_info(QString filename);
    void send_comboBox_info(QString arg);


private:
    Ui::MainWindow *ui;
    detector* detector_;
    const QString text = "YOLOV8";

    QString filename;
    bool IsDetect_ok = false;

};
#endif // MAINWINDOW_H
